package Chapter09.HomeWork.Work03;

public class Teacher {
    private int age;
    private String school="北大青鸟";
    private String name;
    public void setAge(int age)throws Exception{
        if(age<22){
            throw new Exception("年龄少于22");
        }else {
            this.age=age;
        }
    }
}
